With development of terminal technology and communication technology, terminals such as mobile phones and tablet computers are popular and become important tools in people's daily life and work. A terminal generally has a locking function, such as a function for locking a screen, an application, or the like. When a user inputs unlocking information which meets a preset unlocking condition, the terminal is switched from a lock screen state to an unlock screen state.
Conventionally, sliding gestures can used to unlock the terminal as follows. Nine reference points, arranged in three rows with three reference points each row, are displayed on a screen of the terminal. A user may set up an unlocking condition, for example, the user slides a finger over the screen and the touch movement corresponding to a touch signal passes one or more of the reference points in order. The terminal then records the reference points passed by the touch movement corresponding to the touch signal and the order thereof as the unlocking condition. The user may slide a finger over the screen to perform the unlocking, and the terminal is triggered to be unlocked if the touch movement passes the recorded reference points in the recorded order.
However, a touch trace may be left on the screen during the unlocking, so that the unlocking condition may be detected by a third party, and thus data security of the terminal is affected.